package com.fengwk.support.api;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.fengwk.support.util.ResultUtils;
import com.fengwk.support.util.WebUtils;

@ResponseBody
public abstract class AbstractApiController {

	@Autowired
	protected HttpServletRequest request;
	@Autowired
	protected HttpServletResponse response;
	
	@RequestMapping("/url")
	public void url() {
		ResultUtils.returnJsonResult(request, response, WebUtils.getSelfUrl(request));
	}
	
}